home *** CD-ROM | disk | FTP | other *** search
- Path: axl.dialup.fu-berlin.DE!not-for-mail
- From: axl@zedat.fu-berlin.de (Axel Thimm)
- Newsgroups: comp.lang.c,comp.lang.c++,gnu.gcc.help,gnu.g++.help,comp.os.msdos.djgpp
- Subject: Re: float != float and floats as return types
- Date: Fri, 02 Feb 1996 03:31:08 GMT
- Organization: FU Berlin
- Message-ID: <4es0ep$is2@fu-berlin.de>
- References: <DM19oy.KsJ@granite.mv.net>
- Reply-To: axl@zedat.fu-berlin.de
- NNTP-Posting-Host: axl.dialup.fu-berlin.de (160.45.218.93)
- X-Access: 16 17 19
- X-Newsreader: Forte Free Agent 1.0.82
-
- Eli Zaretskii <eliz@is.elta.co.il> wrote:
- [...]
- >> -ffloat-store
-
- >Just to make the picture complete: this switch should only be used in
- >programs which break without it, because holding intermediate results in
- >the most precise representation makes FP computations more accurate.
- [...]
- >Another case of justified use of that switch is a program which explores
- >the intricacies of the floating-point representation of a machine.
-
- The reason I "expored" this behaviour was an optimization by hand of a
- simulation program. A lattices site value is very often used in
- quadratic terms, so introducing a second lattice and storing theese
- values seemed like just speeding up the process. I was amazed when the
- output changed (the results were still within the stat. error).
- So if someone is writing programs that can do exactly the same thing
- with two different implementations, then he would very much like to turn
- such optimizations temporarily off, to get the same results. Later he
- would turn them on again.
-
- ===
- Axel Thimm <axl@zedat.fu-berlin.de>
- Freie Universitaet Berlin
- ===
-
-